fix(PLU-373): make notion database test row-order insensitive#714
Conversation
The notion_database integration test compared the downloaded HTML byte- for-byte against a checked-in fixture, but Notion's database query endpoint doesn't guarantee a stable row order — every prior fixture refresh was just reshuffling the same rows. Compare rows as a multiset of text content and print the symmetric difference on mismatch so real regressions aren't silent. Version is bumped to 1.6.2-dev to satisfy check-version without claiming a release slot for a test-only change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
1 issue found across 4 files
Shadow auto-approve: would not auto-approve because issues were found.
Fix all with cubic | Re-trigger cubic
Comment said the helper inspected the first <table>, but the code scans
every <tr> in the document via soup.find_all("tr").
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would auto-approve. This change only modifies test infrastructure and documentation: it adds an order-insensitive HTML table equality check for a single Notion integration test, updates CHANGELOG, and bumps a dev version, with no impact on production code, business logic, or critical systems.
Re-trigger cubic
|
@claude please review |
|
Claude finished @potter-potter's task —— View job Code ReviewReviewing PR changes to fix flaky Notion database tests... Todo List:
Analysis of Changes✅ New
|
…row-order # Conflicts: # CHANGELOG.md # unstructured_ingest/__version__.py
Summary
test_notion_source_databasecompared the downloaded HTML byte-for-byte. Every prior "fix" (fix(fixtures): update SharePoint and Notion integration test fixtures #693, Fix databricks sdk version #605) was just reshuffling the same four rows.unordered_table_html_equality_checkthat compares the header positionally and data rows as a multiset of their text content, and wire it into the database test only (the page test isn't a table).1.6.2-devto satisfycheck-versionwithout claiming a release slot for a test-only change.Test plan
uncategorized_connectors_int_testNotion tests pass (real verification — needs the CI'sNOTION_API_KEY)Summary by cubic
Make the Notion database integration test row-order insensitive and correct a misleading helper comment, eliminating flaky failures when Notion returns rows in different orders. Addresses PLU-373.
unordered_table_html_equality_checkto compare the header positionally and treat table rows as a multiset; prints a readable symmetric diff on mismatch.test_notion_source_databaseonly; the page test remains unchanged.<tr>elements, not just the first table.1.6.6-devand updatedCHANGELOG.md; test-only change with no runtime impact.Written for commit 87d92cc. Summary will update on new commits. Review in cubic